1. Field of Invention
The invention relates to a data protection method and, in particular, to the method of protecting the data in the cache memory of a storage system.
2. Related Art
In this era with explosive information, new information technologies are continuously introduced. The increasing needs for data storage have spurred tremendous progress in storage devices and storage techniques, both playing important roles in the information technologies. Network storage techniques, particularly the storage area network (SAN), have wide applications.
The SAN is a network different from the local area network (LAN) or the wide area network (WAN). It is used to connect resources coupled to a server. High transmission rates (at the order of Gigabits/sec) among the internal storage devices, high extensibility, and high reliability are some of its features. In addition to hardware, the SAN has devoted software for managing, monitoring, and configuring the systems.
In the storage system of the SAN, a disk cache, that is a write-back cache, is used to increase the system efficiency. When a write operation is carried on for a device, once the location and size in the random access memory (RAM), the name of the device to be written, and the location in the device for the data are written into the disk cache, the user considers that the operation is finished. Then the devoted read/write device of the system completes the write operation for the data stored in the disk cache at appropriate time, periodical, or the system resources of the RAM being insufficient. However, the data in the disk cache is remained. When a read operation is carried on for the device, the system first determines whether the data to be read are already in the disk cache. If so, the data are extracted directly. Otherwise, the data are read from the storage device and added to the disk cache. To increase the read/write efficiency of block device, the driver thereof usually adopts some special algorithm, such as the elevator algorithm, pre-reading algorithm, and delayed writing algorithm.
Each disk cache item in the operating system (OS) of the storage system represents a physical memory page or block. In the storage system, the disk cache item has a fixed size. Its serial number can be obtained by using the formula (location of the disk cache in the RAM)/(size of the disk cache).
Using the write-back cache enables the storage system to store the data that are already written in the disk cache but not in the storage device. If the storage system is power failure, the data in the disk cache will be lost.
Therefore, to increase the reliability of the SAN, the prior art provides some battery backed RAM solutions. However, these methods are independent and have limited protections for the storage system.